from django.shortcuts import render
from django.http import HttpResponseRedirect,HttpResponse
from .models import *

# Create your views here.


# 楼房资源总界面
def building_total(request):
    context = {}
    return render(request, 'tower/building_total.html', context)


# 增加楼房
def add_building(request):
    info = dict(request.POST)
    del info['csrfmiddlewaretoken']
    print(info)
    '''
        info = { 'building_num': ['教学楼'],
                'floor_num': ['3'],
                'house_num': ['313']}
    '''
    context = {}
    return render(request, 'tower/add_building.html', context)


#删除房间
def del_building(request):
    context = {}
    return render(request, 'tower/del_building.html', context)


# 修改楼房
def change(request):
    context = {}
    return render(request, "tower/change.html", context)


# 查询楼房
def refer_building(request):
    info = dict(request.POST)
    del info['csrfmiddlewaretoken']
    print(info)
    '''
        info = {'tower_name': ['教学楼'],
                'floor_num': ['3'],
                'room_num': ['311']}
    '''




    
    context = {}
    return render(request, 'tower/refer_building.html', context)







